package com.zhoutao123.hephaestus;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;

import java.util.UUID;

@SpringBootApplication
@Slf4j
@MapperScan("com.zhoutao123.hephaestus.repository.dao")
@EnableCaching
public class SpringMybatisApplication extends SpringBootServletInitializer implements CommandLineRunner {

  public static void main(String[] args) {
    SpringApplication.run(SpringMybatisApplication.class, args);
  }

  @Override
  public void run(String... args) {
    String adminPass = UUID.randomUUID().toString();
    log.info("admin password: {}", adminPass);
  }
}
